
<?php

echo "<center>";
  if (isset($_POST['submit'])):
?>

<?php
$user =  $_POST['username'];
$pass= $_POST['password'];

if ($user== 'admin1' && $pass=='123'){
    echo 'THANH CONG';}
  else if   ($user== 'admin2' && $pass=='123'){
    echo 'THANH CONG';}
    
  else if  ($user== 'admin3' && $pass=='123'){
    echo 'THANH CONG';}
    
    else {  
        echo "<script>alert('khong dung')</script>"; 
        
}
?>
<?php

else:
?>



<html>
    <body>
        <h1>login</h1>
        <h4>username:admin1</h4>
        <h4>password:123</h4>
        <form action="formDangNhap.php" method="Post">
            <table>
                <tr><td><input type="text" name="username"></td></tr>
                <tr><td><input type="password" name="password"></td></tr>
                <tr><td><input type="submit" name="submit" value="Enter"></td></tr>
            </table>
        </form>
        
        <?php
    endif;
        ?>
    </body>
</html>